home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Samples / SampleCode / ScreenSaver / Twist 1.0.sit / Twist 1.0 / Library Source / GoToWebPage.c < prev    next >
MacBinary  |  1996-08-06  |  2.6 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Aug 6 07:55:21 1996, modified Tue Aug 6 07:55:21 1996, creator 'CWIE', type ASCII, 2000 bytes "GoToWebPage.c" , at 0x850 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 47 6f 54 6f 57 65 | 62 50 61 67 65 2e 63 00 |..GoToWe|bPage.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 07 d0 00 | 00 01 9a ae 2c e3 29 ae |........|....,.).|
|00000060| 2c e3 29 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |,.).....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 1e 37 00 00 |........|.....7..|
|00000080| 2f 2a 20 47 6f 54 6f 57 | 65 62 50 61 67 65 2e 63 |/* GoToW|ebPage.c|
|00000090| 0d 20 2a 20 4c 61 75 6e | 63 68 20 61 20 62 72 6f |. * Laun|ch a bro|
|000000a0| 77 73 65 72 20 61 6e 64 | 20 67 6f 20 74 6f 20 61 |wser and| go to a|
|000000b0| 20 67 69 76 65 6e 20 55 | 52 4c 0d 20 2a 20 43 6f | given U|RL. * Co|
|000000c0| 70 79 72 69 67 68 74 20 | a9 31 39 39 36 20 4d 69 |pyright |.1996 Mi|
|000000d0| 63 68 61 65 6c 20 44 2e | 20 43 72 61 77 66 6f 72 |chael D.| Crawfor|
|000000e0| 64 2e 20 20 41 6c 6c 20 | 52 69 67 68 74 73 20 52 |d. All |Rights R|
|000000f0| 65 73 65 72 76 65 64 2e | 0d 20 2a 20 59 6f 75 20 |eserved.|. * You |
|00000100| 6d 61 79 20 75 73 65 20 | 74 68 69 73 20 63 6f 64 |may use |this cod|
|00000110| 65 20 6f 6e 20 74 68 65 | 20 63 6f 6e 64 69 74 69 |e on the| conditi|
|00000120| 6f 6e 20 74 68 61 74 20 | 79 6f 75 20 72 65 61 64 |on that |you read|
|00000130| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 77 | the fol|lowing w|
|00000140| 65 62 20 70 61 67 65 3a | 0d 20 2a 20 68 74 74 70 |eb page:|. * http|
|00000150| 3a 2f 2f 77 77 77 2e 73 | 63 72 75 7a 6e 65 74 2e |://www.s|cruznet.|
|00000160| 63 6f 6d 2f 7e 63 72 61 | 77 66 6f 72 64 2f 57 6f |com/~cra|wford/Wo|
|00000170| 72 64 53 65 72 76 69 63 | 65 73 2f 77 64 73 76 69 |rdServic|es/wdsvi|
|00000180| 6e 64 65 78 2e 68 74 6d | 6c 0d 20 2a 2f 0d 0d 23 |ndex.htm|l. */..#|
|00000190| 69 6e 63 6c 75 64 65 20 | 22 46 69 6e 64 42 72 6f |include |"FindBro|
|000001a0| 77 73 65 72 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |wser.h".|#include|
|000001b0| 20 22 47 6f 54 6f 57 65 | 62 50 61 67 65 2e 68 22 | "GoToWe|bPage.h"|
|000001c0| 0d 0d 23 64 65 66 69 6e | 65 20 6b 43 61 6e 6e 6f |..#defin|e kCanno|
|000001d0| 74 46 69 6e 64 42 72 6f | 77 73 65 72 49 44 09 31 |tFindBro|wserID.1|
|000001e0| 32 38 0d 0d 4f 53 45 72 | 72 20 47 6f 54 6f 57 65 |28..OSEr|r GoToWe|
|000001f0| 62 50 61 67 65 28 20 53 | 74 72 69 6e 67 50 74 72 |bPage( S|tringPtr|
|00000200| 20 75 72 6c 53 74 72 20 | 29 0d 7b 0d 09 41 45 41 | urlStr |).{..AEA|
|00000210| 64 64 72 65 73 73 44 65 | 73 63 09 09 63 72 65 61 |ddressDe|sc..crea|
|00000220| 74 6f 72 44 65 73 63 3b | 0d 09 41 70 70 6c 65 45 |torDesc;|..AppleE|
|00000230| 76 65 6e 74 09 67 75 72 | 6c 45 76 74 3b 0d 09 41 |vent.gur|lEvt;..A|
|00000240| 70 70 6c 65 45 76 65 6e | 74 09 72 65 70 6c 79 45 |ppleEven|t.replyE|
|00000250| 76 74 3b 0d 09 4f 53 54 | 79 70 65 09 09 63 72 65 |vt;..OST|ype..cre|
|00000260| 61 74 6f 72 3b 0d 09 41 | 45 44 65 73 63 09 09 75 |ator;..A|EDesc..u|
|00000270| 72 6c 44 65 73 63 3b 0d | 09 6c 6f 6e 67 09 09 6c |rlDesc;.|.long..l|
|00000280| 65 6e 3b 0d 09 4f 53 45 | 72 72 09 09 65 72 72 3b |en;..OSE|rr..err;|
|00000290| 0d 09 0d 09 65 72 72 20 | 3d 20 46 69 6e 64 42 72 |....err |= FindBr|
|000002a0| 6f 77 73 65 72 28 20 26 | 63 72 65 61 74 6f 72 20 |owser( &|creator |
|000002b0| 29 3b 0d 09 0d 09 69 66 | 20 28 20 65 72 72 20 29 |);....if| ( err )|
|000002c0| 7b 0d 09 09 72 65 74 75 | 72 6e 20 65 72 72 3b 0d |{...retu|rn err;.|
|000002d0| 09 7d 0d 09 0d 09 69 66 | 20 28 20 63 72 65 61 74 |.}....if| ( creat|
|000002e0| 6f 72 20 3d 3d 20 27 6e | 75 6c 6c 27 20 29 7b 0d |or == 'n|ull' ){.|
|000002f0| 09 09 53 74 6f 70 41 6c | 65 72 74 28 20 6b 43 61 |..StopAl|ert( kCa|
|00000300| 6e 6e 6f 74 46 69 6e 64 | 42 72 6f 77 73 65 72 49 |nnotFind|BrowserI|
|00000310| 44 2c 20 28 4d 6f 64 61 | 6c 46 69 6c 74 65 72 55 |D, (Moda|lFilterU|
|00000320| 50 50 29 4e 55 4c 4c 20 | 29 3b 0d 09 09 72 65 74 |PP)NULL |);...ret|
|00000330| 75 72 6e 20 6e 6f 45 72 | 72 3b 0d 09 7d 0d 09 0d |urn noEr|r;..}...|
|00000340| 09 65 72 72 20 3d 20 41 | 45 43 72 65 61 74 65 44 |.err = A|ECreateD|
|00000350| 65 73 63 28 20 74 79 70 | 65 41 70 70 6c 53 69 67 |esc( typ|eApplSig|
|00000360| 6e 61 74 75 72 65 2c 0d | 09 09 09 09 09 09 28 50 |nature,.|......(P|
|00000370| 74 72 29 26 63 72 65 61 | 74 6f 72 2c 0d 09 09 09 |tr)&crea|tor,....|
|00000380| 09 09 09 73 69 7a 65 6f | 66 28 20 63 72 65 61 74 |...sizeo|f( creat|
|00000390| 6f 72 20 29 2c 0d 09 09 | 09 09 09 09 26 63 72 65 |or ),...|....&cre|
|000003a0| 61 74 6f 72 44 65 73 63 | 20 29 3b 0d 09 69 66 20 |atorDesc| );..if |
|000003b0| 28 20 65 72 72 20 29 0d | 09 09 72 65 74 75 72 6e |( err ).|..return|
|000003c0| 20 65 72 72 3b 0d 09 09 | 0d 09 6c 65 6e 20 3d 20 | err;...|..len = |
|000003d0| 75 72 6c 53 74 72 5b 20 | 30 20 5d 3b 0d 09 0d 09 |urlStr[ |0 ];....|
|000003e0| 65 72 72 20 3d 20 41 45 | 43 72 65 61 74 65 44 65 |err = AE|CreateDe|
|000003f0| 73 63 28 20 74 79 70 65 | 43 68 61 72 2c 0d 09 09 |sc( type|Char,...|
|00000400| 09 09 09 09 26 28 20 28 | 75 72 6c 53 74 72 29 5b |....&( (|urlStr)[|
|00000410| 20 31 20 5d 20 29 2c 0d | 09 09 09 09 09 09 6c 65 | 1 ] ),.|......le|
|00000420| 6e 2c 0d 09 09 09 09 09 | 09 26 75 72 6c 44 65 73 |n,......|.&urlDes|
|00000430| 63 20 29 3b 0d 09 69 66 | 20 28 20 65 72 72 20 29 |c );..if| ( err )|
|00000440| 0d 09 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 0d |...retur|n err;..|
|00000450| 0d 09 69 66 20 28 20 63 | 72 65 61 74 6f 72 20 3d |..if ( c|reator =|
|00000460| 3d 20 27 4d 4f 53 21 27 | 20 29 7b 0d 09 09 2f 2f |= 'MOS!'| ){...//|
|00000470| 20 4e 43 53 41 20 4d 6f | 73 61 69 63 20 68 61 73 | NCSA Mo|saic has|
|00000480| 20 69 74 73 20 6f 77 6e | 20 69 64 65 61 73 20 66 | its own| ideas f|
|00000490| 6f 72 20 41 45 20 75 72 | 6c 73 0d 09 09 65 72 72 |or AE ur|ls...err|
|000004a0| 20 3d 20 41 45 43 72 65 | 61 74 65 41 70 70 6c 65 | = AECre|ateApple|
|000004b0| 45 76 65 6e 74 28 20 27 | 6d 6f 73 21 27 2c 0d 09 |Event( '|mos!',..|
|000004c0| 09 09 09 09 09 09 09 09 | 27 6f 75 72 6c 27 2c 0d |........|'ourl',.|
|000004d0| 09 09 09 09 09 09 09 09 | 09 26 63 72 65 61 74 6f |........|.&creato|
|000004e0| 72 44 65 73 63 2c 0d 09 | 09 09 09 09 09 09 09 09 |rDesc,..|........|
|000004f0| 6b 41 75 74 6f 47 65 6e | 65 72 61 74 65 52 65 74 |kAutoGen|erateRet|
|00000500| 75 72 6e 49 44 2c 0d 09 | 09 09 09 09 09 09 09 09 |urnID,..|........|
|00000510| 6b 41 6e 79 54 72 61 6e | 73 61 63 74 69 6f 6e 49 |kAnyTran|sactionI|
|00000520| 44 2c 0d 09 09 09 09 09 | 09 09 09 09 26 67 75 72 |D,......|....&gur|
|00000530| 6c 45 76 74 20 29 3b 0d | 09 7d 65 6c 73 65 7b 0d |lEvt );.|.}else{.|
|00000540| 09 09 65 72 72 20 3d 20 | 41 45 43 72 65 61 74 65 |..err = |AECreate|
|00000550| 41 70 70 6c 65 45 76 65 | 6e 74 28 20 27 47 55 52 |AppleEve|nt( 'GUR|
|00000560| 4c 27 2c 0d 09 09 09 09 | 09 09 09 09 09 27 47 55 |L',.....|.....'GU|
|00000570| 52 4c 27 2c 0d 09 09 09 | 09 09 09 09 09 09 26 63 |RL',....|......&c|
|00000580| 72 65 61 74 6f 72 44 65 | 73 63 2c 0d 09 09 09 09 |reatorDe|sc,.....|
|00000590| 09 09 09 09 09 6b 41 75 | 74 6f 47 65 6e 65 72 61 |.....kAu|toGenera|
|000005a0| 74 65 52 65 74 75 72 6e | 49 44 2c 0d 09 09 09 09 |teReturn|ID,.....|
|000005b0| 09 09 09 09 09 6b 41 6e | 79 54 72 61 6e 73 61 63 |.....kAn|yTransac|
|000005c0| 74 69 6f 6e 49 44 2c 0d | 09 09 09 09 09 09 09 09 |tionID,.|........|
|000005d0| 09 26 67 75 72 6c 45 76 | 74 20 29 3b 0d 09 7d 0d |.&gurlEv|t );..}.|
|000005e0| 09 69 66 20 28 20 65 72 | 72 20 29 0d 09 09 72 65 |.if ( er|r )...re|
|000005f0| 74 75 72 6e 20 65 72 72 | 3b 0d 09 0d 09 65 72 72 |turn err|;....err|
|00000600| 20 3d 20 41 45 44 69 73 | 70 6f 73 65 44 65 73 63 | = AEDis|poseDesc|
|00000610| 28 20 26 63 72 65 61 74 | 6f 72 44 65 73 63 20 29 |( &creat|orDesc )|
|00000620| 3b 0d 09 69 66 20 28 20 | 65 72 72 20 29 0d 09 09 |;..if ( |err )...|
|00000630| 72 65 74 75 72 6e 20 65 | 72 72 3b 0d 0d 09 65 72 |return e|rr;...er|
|00000640| 72 20 3d 20 41 45 50 75 | 74 50 61 72 61 6d 44 65 |r = AEPu|tParamDe|
|00000650| 73 63 28 20 26 67 75 72 | 6c 45 76 74 2c 0d 09 09 |sc( &gur|lEvt,...|
|00000660| 09 09 09 09 09 6b 65 79 | 44 69 72 65 63 74 4f 62 |.....key|DirectOb|
|00000670| 6a 65 63 74 2c 0d 09 09 | 09 09 09 09 09 26 75 72 |ject,...|.....&ur|
|00000680| 6c 44 65 73 63 20 29 3b | 0d 09 09 09 09 09 09 09 |lDesc );|........|
|00000690| 0d 09 69 66 20 28 20 65 | 72 72 20 29 0d 09 09 72 |..if ( e|rr )...r|
|000006a0| 65 74 75 72 6e 20 65 72 | 72 3b 0d 09 0d 09 65 72 |eturn er|r;....er|
|000006b0| 72 20 3d 20 41 45 44 69 | 73 70 6f 73 65 44 65 73 |r = AEDi|sposeDes|
|000006c0| 63 28 20 26 75 72 6c 44 | 65 73 63 20 29 3b 0d 09 |c( &urlD|esc );..|
|000006d0| 69 66 20 28 20 65 72 72 | 20 29 0d 09 09 72 65 74 |if ( err| )...ret|
|000006e0| 75 72 6e 20 65 72 72 3b | 0d 0d 09 65 72 72 20 3d |urn err;|...err =|
|000006f0| 20 41 45 53 65 6e 64 28 | 20 26 67 75 72 6c 45 76 | AESend(| &gurlEv|
|00000700| 74 2c 0d 09 09 09 09 09 | 26 72 65 70 6c 79 45 76 |t,......|&replyEv|
|00000710| 74 2c 0d 09 09 09 09 09 | 6b 41 45 57 61 69 74 52 |t,......|kAEWaitR|
|00000720| 65 70 6c 79 20 2b 20 6b | 41 45 43 61 6e 49 6e 74 |eply + k|AECanInt|
|00000730| 65 72 61 63 74 20 2b 20 | 6b 41 45 43 61 6e 53 77 |eract + |kAECanSw|
|00000740| 69 74 63 68 4c 61 79 65 | 72 2c 0d 09 09 09 09 09 |itchLaye|r,......|
|00000750| 6b 41 45 4e 6f 72 6d 61 | 6c 50 72 69 6f 72 69 74 |kAENorma|lPriorit|
|00000760| 79 2c 0d 09 09 09 09 09 | 33 30 30 2c 0d 09 09 09 |y,......|300,....|
|00000770| 09 09 28 41 45 49 64 6c | 65 55 50 50 29 4e 55 4c |..(AEIdl|eUPP)NUL|
|00000780| 4c 2c 0d 09 09 09 09 09 | 28 41 45 46 69 6c 74 65 |L,......|(AEFilte|
|00000790| 72 55 50 50 29 4e 55 4c | 4c 20 29 3b 0d 09 0d 09 |rUPP)NUL|L );....|
|000007a0| 69 66 20 28 20 65 72 72 | 20 29 7b 0d 09 09 72 65 |if ( err| ){...re|
|000007b0| 74 75 72 6e 20 65 72 72 | 3b 0d 09 7d 0d 09 0d 09 |turn err|;..}....|
|000007c0| 65 72 72 20 3d 20 41 45 | 44 69 73 70 6f 73 65 44 |err = AE|DisposeD|
|000007d0| 65 73 63 28 20 26 67 75 | 72 6c 45 76 74 20 29 3b |esc( &gu|rlEvt );|
|000007e0| 0d 09 69 66 20 28 20 65 | 72 72 20 29 0d 09 09 72 |..if ( e|rr )...r|
|000007f0| 65 74 75 72 6e 20 6e 6f | 45 72 72 3b 0d 09 0d 09 |eturn no|Err;....|
|00000800| 65 72 72 20 3d 20 41 45 | 44 69 73 70 6f 73 65 44 |err = AE|DisposeD|
|00000810| 65 73 63 28 20 26 72 65 | 70 6c 79 45 76 74 20 29 |esc( &re|plyEvt )|
|00000820| 3b 0d 09 69 66 20 28 20 | 65 72 72 20 29 0d 09 09 |;..if ( |err )...|
|00000830| 72 65 74 75 72 6e 20 6e | 6f 45 72 72 3b 0d 09 0d |return n|oErr;...|
|00000840| 09 72 65 74 75 72 6e 20 | 6e 6f 45 72 72 3b 0d 7d |.return |noErr;.}|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000880| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000890| 70 75 74 20 66 69 6c 65 | 2e 00 20 46 61 69 6c 65 |put file|.. Faile|
|000008a0| 64 20 74 6f 20 77 72 69 | 74 65 20 6d 65 74 68 6f |d to wri|te metho|
|000008b0| 0d 47 6f 54 6f 57 65 62 | 50 61 67 65 2e 63 02 00 |.GoToWeb|Page.c..|
|000008c0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000008d0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 ae 65 03 b3 00 00 | 00 00 00 00 01 9a 20 66 |...e....|...... f|
|00000900| 69 6c 65 20 d2 25 73 d3 | 2e 00 36 46 61 69 6c 65 |ile .%s.|..6Faile|
|00000910| 64 20 74 6f 20 77 72 69 | 74 65 20 74 65 6d 70 6f |d to wri|te tempo|
|00000920| 72 61 72 79 20 72 65 73 | 6f 75 72 63 65 20 66 69 |rary res|ource fi|
|00000930| 6c 65 20 66 6f 72 20 66 | 69 6c 65 20 d2 25 73 d3 |le for f|ile .%s.|
|00000940| 2e 00 20 44 75 70 6c 69 | 63 61 74 65 20 72 65 73 |.. Dupli|cate res|
|00000950| 6f 75 72 63 65 20 28 25 | 73 29 20 69 67 6e 6f 72 |ource (%|s) ignor|
|00000960| 65 64 2e 00 1d 44 75 70 | 6c 69 63 61 74 65 20 63 |ed...Dup|licate c|
|00000970| 6c 61 73 73 20 69 6e 20 | 66 69 6c 65 20 d2 25 73 |lass in |file .%s|
|00000980| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 03 | 00 04 00 75 00 8b 02 78 |........|...u...x|
|000009b0| 02 ea 00 75 00 8b 02 78 | 02 ea ae 3b c8 53 00 00 |...u...x|...;.S..|
|000009c0| 02 76 00 00 02 7b 00 00 | 01 28 01 00 00 00 00 04 |.v...{..|.(......|
|000009d0| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|000009e0| 00 00 00 46 01 79 77 34 | 1b 2e 00 00 00 1c 00 46 |...F.yw4|.......F|
|000009f0| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000a00| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00000a10| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|00000a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+